.class Lcom/direction/hold/ui/CommonActivity$8;
.super Landroid/os/HandlerThread;


# instance fields
.field private synthetic a:Lcom/direction/hold/ui/CommonActivity;


# direct methods
.method constructor <init>(Lcom/direction/hold/ui/CommonActivity;Ljava/lang/String;I)V
    .locals 0

    iput-object p1, p0, Lcom/direction/hold/ui/CommonActivity$8;->a:Lcom/direction/hold/ui/CommonActivity;

    invoke-direct {p0, p2, p3}, Landroid/os/HandlerThread;-><init>(Ljava/lang/String;I)V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 7

    const/4 v6, 0x0

    const/4 v0, -0x1

    :goto_0
    invoke-static {}, Lcn/cheln/explorer/func/EmptyDirectoryCleaner;->a()I

    move-result v1

    if-eq v0, v1, :cond_1

    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "= i "

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, " "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-static {}, Lcn/cheln/explorer/func/EmptyDirectoryCleaner;->a()I

    move-result v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcn/cheln/support/app/c;->a(Ljava/lang/String;)V

    invoke-static {}, Lcn/cheln/explorer/func/EmptyDirectoryCleaner;->a()I

    move-result v1

    new-instance v2, Ljava/io/File;

    iget-object v0, p0, Lcom/direction/hold/ui/CommonActivity$8;->a:Lcom/direction/hold/ui/CommonActivity;

    iget-object v0, v0, Lcom/direction/hold/ui/CommonActivity;->d:Lcom/direction/hold/ui/CommonActivity;

    invoke-virtual {v0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v0

    const-class v3, Lcom/direction/hold/ui/PathActivity;

    if-ne v0, v3, :cond_0

    iget-object v0, p0, Lcom/direction/hold/ui/CommonActivity$8;->a:Lcom/direction/hold/ui/CommonActivity;

    iget-object v0, v0, Lcom/direction/hold/ui/CommonActivity;->a:Lcn/cheln/explorer/ds/a/d;

    iget-object v0, v0, Lcn/cheln/explorer/ds/a/d;->a:Ljava/util/Stack;

    invoke-virtual {v0}, Ljava/util/Stack;->peek()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcn/cheln/explorer/ds/a/c;

    iget-object v0, v0, Lcn/cheln/explorer/ds/a/c;->b:Ljava/lang/Object;

    check-cast v0, Lcn/cheln/explorer/beans/FileInfo;

    iget-object v0, v0, Lcn/cheln/explorer/beans/FileInfo;->path:Ljava/lang/String;

    :goto_1
    invoke-direct {v2, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    new-instance v0, Lcn/cheln/explorer/func/EmptyDirectoryCleaner;

    const/4 v3, 0x1

    new-array v3, v3, [Ljava/lang/Integer;

    const/4 v4, 0x4

    invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v4

    aput-object v4, v3, v6

    sget-object v4, Lcn/cheln/explorer/config/Constants;->a:[Lcn/cheln/explorer/ds/sdcard/TypeFilter$TextWrapper;

    const/4 v5, 0x0

    invoke-direct {v0, v3, v4, v5}, Lcn/cheln/explorer/func/EmptyDirectoryCleaner;-><init>([Ljava/lang/Integer;[Lcn/cheln/explorer/ds/sdcard/TypeFilter$TextWrapper;[Ljava/lang/String;)V

    invoke-virtual {v2, v0}, Ljava/io/File;->listFiles(Ljava/io/FileFilter;)[Ljava/io/File;

    move v0, v1

    goto :goto_0

    :cond_0
    const-string v0, "/mnt/sdcard"

    goto :goto_1

    :cond_1
    sput-boolean v6, Lcn/cheln/explorer/func/EmptyDirectoryCleaner;->a:Z

    iget-object v0, p0, Lcom/direction/hold/ui/CommonActivity$8;->a:Lcom/direction/hold/ui/CommonActivity;

    iget-object v0, v0, Lcom/direction/hold/ui/CommonActivity;->i:Landroid/os/Handler;

    const/16 v1, 0x9

    invoke-virtual {v0, v1}, Landroid/os/Handler;->sendEmptyMessage(I)Z

    invoke-static {}, Lcn/cheln/explorer/func/EmptyDirectoryCleaner;->a()I

    move-result v0

    if-nez v0, :cond_3

    :cond_2
    return-void

    :cond_3
    sget-object v0, Lcn/cheln/explorer/func/EmptyDirectoryCleaner;->b:Ljava/util/Set;

    invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v1

    :goto_2
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_2

    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcn/cheln/explorer/beans/ReportInfo;

    new-instance v2, Lcn/cheln/explorer/beans/FileInfo;

    iget-object v0, v0, Lcn/cheln/explorer/beans/ReportInfo;->secondline_detail:Ljava/lang/String;

    iget-object v3, p0, Lcom/direction/hold/ui/CommonActivity$8;->a:Lcom/direction/hold/ui/CommonActivity;

    invoke-direct {v2, v0, v3}, Lcn/cheln/explorer/beans/FileInfo;-><init>(Ljava/lang/String;Landroid/content/Context;)V

    iget-object v0, p0, Lcom/direction/hold/ui/CommonActivity$8;->a:Lcom/direction/hold/ui/CommonActivity;

    invoke-static {v2, v0}, Lcn/cheln/support/app/a;->a(Lcn/cheln/explorer/beans/FileInfo;Landroid/content/Context;)V

    goto :goto_2
.end method
